package com.gict.antifraudback.service;

import com.gict.antifraudback.entity.LikeRecord;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
* @author XIE
* @description 针对表【like_record】的数据库操作Service
* @createDate 2023-11-02 15:18:53
*/
public interface LikeRecordService extends IService<LikeRecord> {

    Integer countByArticleId(Integer id);

    /**
     *
     * @param ids 评论或者文章id
     * @param type 类型 article 或 comment
     * @param id 点赞用户id
     * @return 点赞记录集合
     */
    List<LikeRecord> listByIdsAndType(List<Integer> ids, String type, Integer id);

    Map<Integer, Map<String, Long>> countByArticleCommentIdsAndType(List<Integer> ids);
}
